<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	  <style>
		   /* 兄弟选择器,选择p后的所有的兄弟span */
		 p ~ span{
			 color: red;	 
		 }	 
		 p + span{
		    background-color: green; 
		 }
		</style>
	
	</head>
	<body>
		<span>0</span>
		<p>1</p>
		<span>2</span>
		<hr>
		<div><span>3</span></div>
		<span>4</span>
		
	</body>
</html>
